package com.shuziren.question.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.yulichang.annotation.Table;
import com.shuziren.question.entity.dto.InterviewCategoryDTO;
import com.shuziren.question.entity.vo.QuestionCategoryVO;
import lombok.Data;
import java.util.Date;
import java.util.List;

/**
 * 题目实体类
 */
@Data
@TableName("interview_question")
public class InterviewQuestion {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    @TableField(value = "title")
    private String title;
    @TableField(value = "description")
    private String description;
    @TableField(value = "difficulty")
    private Integer difficulty;
    @TableField(value = "expected_time")
    private Integer expectedTime;
    @TableField(value = "tags")
    private String tags;
    @TableField(value = "score")
    private Integer score;
    @TableField(value = "answer")
    private String answer;
    @TableField(value = "created_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;
    @TableField(value = "updated_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;
    @TableField(value = "status")
    private Integer status;
    @TableField(exist = false)
    private List<QuestionCategoryVO> categories;
}